home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 July: Mac OS SDK / Dev.CD Jul 97 SDK1.toast / Development Kits (Disc 1) / QuickDraw GX / Programming Stuff / Sample Code / Printing Samples / Printer Drivers… / CustomWriterGX / ChooserPACK.a < prev    next >
Encoding:
Text File  |  1996-03-20  |  3.0 KB  |  96 lines  |  [TEXT/MPS ]

  1. ;------------------------------------------------------------------------------
  2. ;
  3. ;    FILENAME
  4. ;        ChooserSupport.a
  5. ;
  6. ;    DESCRIPTION
  7. ;        Contains the code to form the first part of the Chooser 'PACK' for
  8. ;        this driver.
  9. ;
  10. ;    COPYRIGHT
  11. ;        Copyright © 1995 Apple Computer, Inc.
  12. ;        All rights reserved.
  13. ;    
  14. ;    Modification history
  15. ;        10/04/95 - David Hayward -    Version 1.0.4 modified code so that
  16. ;                                    the driver can be build under MPW,
  17. ;                                    Metrowerks, and Symantec.  In general,
  18. ;                                    all that was required to do this was 
  19. ;                                    to add an inline-assembly jumptable
  20. ;                                    and to store all globals off of the
  21. ;                                    message manager instance context.
  22. ;                                    Also made a few changes so that the
  23. ;                                    driver can be rebuilt to support any
  24. ;                                    resolution by changing the #defines
  25. ;                                    kResolution and kPatStretch in
  26. ;                                    "CommonDefines.h"
  27. ;
  28. ;        06/14/95 - Dave Hersey -    Version 1.0.3 to fix a bug in
  29. ;                                    CustomBufferingAndIO.c when creating
  30. ;                                    high-res PICTs, and to make the size
  31. ;                                    of buffers more flexible.
  32. ;
  33. ;        05/26/95 - Dave Hersey -    Version 1.0.2 to add the new 'outp'
  34. ;                                    desktop printer resource in NewApp.c.
  35. ;
  36. ;        05/03/95 - Dave Hersey -    Version 1.0.1 to fix some minor bugs in
  37. ;                                    CustomBufferingAndIO.c.
  38. ;
  39. ;        01/14/95 - Dave Hersey -    Created from the shell of a hollowed-out
  40. ;                                    ImageWriter driver.
  41. ;
  42. ;------------------------------------------------------------------------------
  43.  
  44.             STRING    ASIS
  45.             CASE    OBJ
  46.  
  47. kAppleTalkDevice        EQU    $80000000
  48. kIsPAPDevice            EQU $40000000
  49. kIsPostScriptDevice        EQU $20000000
  50. kMultiSelect            EQU    $10000000
  51. kLeftButton                EQU    $08000000
  52. kRightButton            EQU    $04000000
  53. kNoSavedZone            EQU $02000000
  54. kActualZoneNames        EQU    $01000000
  55. kNoIntlChars            EQU    $00800000
  56. kEvenUpName                EQU    $00400000
  57. kLengthOnRename            EQU    $00200000
  58. kUsesOnAndOff            EQU    $00100000
  59. kNoSetSelfSend            EQU    $00080000
  60. kUnused18                EQU    $00040000
  61. kAcceptsInit            EQU    $00020000
  62. kAcceptsNewSel            EQU $00010000
  63. kAcceptsFillList        EQU $00008000
  64. kAcceptsGetSel            EQU    $00004000
  65. kAcceptsSelect            EQU $00002000
  66. kAcceptsDeselect        EQU $00001000
  67. kAcceptsTerminate        EQU    $00000800
  68.  
  69.  
  70.         IMPORT PACKMAIN        ; our device routine (from ChooserPACK.c)
  71.     
  72. ;--------------------------------------------------------------------------------
  73. ;    This code must be kept in sync with the in-line assembly
  74. ;    in ChooserPACK.c
  75. ;--------------------------------------------------------------------------------
  76.  
  77. PACKENTRY    PROC     EXPORT
  78.     BRA.S    code            ; branch to our actual code
  79.     DC.W    169                ; device ID
  80.     DC.L    'PACK'            ; device type
  81.     DC.W    $F000            ; master ID for resources (-4096)
  82.     DC.W    2                ; version
  83.     DC.L    kLeftButton+kUsesOnAndOff+kAcceptsInit+kAcceptsTerminate
  84.  
  85. data:        
  86.     ds.b    38                ; sizeof(PACKglobalRec)
  87.             
  88. code:        
  89.     MOVE.L    (a7)+,a0        ; move return address into a0
  90.     PEA        data            ; add a pointer to our global data onto stack as last parameter
  91.     MOVE.L    a0,-(a7)        ; put the return address back on the stack
  92.     jmp        PACKMAIN        ; jump to it, so when it does the return, it goes to OUR caller
  93.     rts
  94.  
  95.     END
  96.